package com.ruoyi.business.controller.common;

import com.ruoyi.business.domain.vo.SysAreaVo;
import com.ruoyi.business.service.ISysAreaService;
import com.ruoyi.common.core.domain.R;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 省市区
 *
 * @author yyt
 */
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/area")
public class SysAreaController {

    private final ISysAreaService sysAreaService;

    @GetMapping()
    public R<List<SysAreaVo>> get() {
        return R.ok(sysAreaService.selectVoArea());
    }

}
